package com.gljr.autotest.tool;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;

public class DriverFactory {
	public WebDriver createDriver(DriverName driverName) {
		switch (driverName) {
		case firefox:
			return new FirefoxDriver();
		case chrome:
			return new ChromeDriver();
		case ie:
			return new InternetExplorerDriver();
		default:
			break;
		}
		return null;
	}

	public enum DriverName {
		firefox, chrome, ie
	}
}
